Skip to content

[rush-lib] Normalize plugin autoinstaller file line endings#5678

Merged
octogonz merged 1 commit intomicrosoft:mainfrom
kevin-y-ang:fix/rush-lib-autoinstaller-loader
Mar 4, 2026
Merged

[rush-lib] Normalize plugin autoinstaller file line endings#5678
octogonz merged 1 commit intomicrosoft:mainfrom
kevin-y-ang:fix/rush-lib-autoinstaller-loader

Conversation

@kevin-y-ang
Copy link
Contributor

@kevin-y-ang kevin-y-ang commented Mar 2, 2026

Summary

  • Update AutoinstallerPluginLoader.ts to read source JSON files and write them with convertLineEndings: NewlineKind.Lf.
  • Apply this behavior to both the plugin manifest and optional command-line JSON file.

Details

  • At TikTok we develop on Mac. When running rush update, AutoinstallerPluginLoader.ts will the line endings of rush-plugin-manifest.json and command-line.json. This creates unstaged changes that causes confusion and inconvenience for developers.
  • This behavior eists because FileSystem.copyFile() does not support the option convertLineEndings: NewlineKind.Lf. This problem can be resolved by reading the file into memory with FileSystem.readFile() and writing it with FileSystem.writeFile() with the convertLineEndings: NewlineKind.Lf option.

How it was tested

  • Testing it on TikTok repos, this removes the issue of Rush changing the line endings of rush-plugin-manifest.json and command-line.json when running rush update.
image

@octogonz octogonz merged commit b870ea6 into microsoft:main Mar 4, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants